/* ALGORITMO DE BUBBLE SORT (bubblesort.c) */

#include "bubblesort.h"

void bubblesort (char **words, int arraysize) {

	int j = 0;
	int index = 0;
	char *auxWord = NULL; 

	for (j = 0; j < arraysize; j++) {
		for (index = 0; index < (arraysize -1); index++) {
			if (strcasecmp(words[index], words[index + 1]) > 0) {
				auxWord = words[index];
				words[index] = words[index + 1];
				words[index + 1] = auxWord;
			}
		}
	}
}

/* FIN DE ALGORITMO DE BUBBLE SORT (bubblesort.c) */
